package com.example.fraction.slice;

import com.example.fraction.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.aafwk.content.IntentParams;
import ohos.agp.components.Component;
import ohos.agp.components.webengine.WebView;

public class intent_mainSlice extends AbilitySlice {
    WebView webView;
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_intent_main);
        webView = (WebView) webView.findComponentById(ResourceTable.Id_web);
        String name = intent.getStringParam("name");
        webView.load(name);
    }

    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }
}
